home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / TCL1 / __MANDEL / TCL_SOUR / CDWAPPLI.C next >
Text File  |  1992-04-14  |  865b  |  45 lines

  1. /* CDWApplication.c */
  2.  
  3. #include <CDWApplication.h>
  4. #include <CDWSwitchboard.h>
  5. #include <CNotification.h>
  6. #include <Global.h>
  7.  
  8. extern Boolean gInBackground;
  9.  
  10. /******************************************************************************
  11.  MakeSwitchboard
  12.  
  13.      Create application's switchboard. Override if a different switchboard
  14.      is desired.
  15. ******************************************************************************/
  16.  
  17. void
  18. CDWApplication::MakeSwitchboard( void)
  19. {
  20.     itsSwitchboard = new(CDWSwitchboard);
  21.     itsSwitchboard->ISwitchboard();
  22. }
  23.  
  24. void
  25. CDWApplication::ZapMouseRgn(void)
  26. {
  27.     SetEmptyRgn(itsSwitchboard->mouseRgn);
  28. }
  29.  
  30. void
  31. CDWApplication::NotifyUser(void)
  32. {
  33.     if (gInBackground)
  34.     {
  35.         itsNotification = new CNotification;
  36.         itsNotification->INotification();
  37.     }
  38. }
  39.  
  40. void
  41. CDWApplication::Resume(void)
  42. {
  43.     ForgetObject(itsNotification);
  44.     inherited::Resume();
  45. }